const mth = {
    number_lerp(from, to, n) {
        return from + n * (to - from)
    },
    /**
     * @param {Vec3} from
     * @param {Vec3} to
     * @param {Number} n
     * */
    Vec3_lerp(from, to, n) {
        return from.add(to.add(from.multiply(-1,-1,-1)).multiply(n,n,n))
    },
    getVec3(length,yaw,pitch){
        var x = (pitch == 90 || pitch == -90) ? 0 : -Math.sin(yaw * PI / 180)*Math.cos(pitch * PI / 180)
        var y = pitch == 90 ? -1 : pitch == -90 ? 1 : -Math.sin(pitch * PI / 180)
        var z = (pitch == 90 || pitch == -90) ? 0 : Math.cos(yaw * PI / 180)*Math.cos(pitch * PI / 180)
        return new Vec3(x,y,z).multiply(length,length,length)
    }
}